﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Site.Models.Message>>" %>

<table>
    <tr>
        <th>
            A
        </th>
        <th>
            Sujet
        </th>
        <th>
            Message
        </th>
        <th>
            Date d'envoi
        </th>
        <th>
            Lu
        </th>
        <th>
            Date Lecture
        </th>
        <th>
        </th>
    </tr>
    <% foreach (var item in Model)
       { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.Receiver) %>
        </td>
        <td>
            <%: Html.ActionLink(item.Subject, "ReadMessage", new { id=item.MessageId })  %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Body) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.SentDate) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Read) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.ReadDate) %>
        </td>
        <td>
           
            <%: Html.ActionLink("Supprimer", "Delete", new { id=item.MessageId }) %>
        </td>
    </tr>
    <% } %>
</table>
